package behavior.mediator;

public class Alarm extends Colleague {

    public Alarm(Mediator mediator, String name) {
        super(mediator, name);
        mediator.register(name,this);
    }

    void sendAlarm(int status) {
        System.out.println("Alarm ===" + status);
        sendMessage(status);
    }

    @Override
    void sendMessage(int status) {
        this.getMediator().getMessage(status,this.name);
    }

}
